<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/public/include/taglib.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd">
<!--[if IE 8]>
<html lang="zh" class="ie8"> <![endif]-->
<!--[if !IE]><!-->
<!--<![endif]-->
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>员工信息</title>
<meta name="decorator" content="decList" />
<script type="text/javascript">
	/*
		JS全局变量:
		pageSize 每页记录数
		isPaginationValue 是否分页
		totalSize 总记录数
		currentPageNum 当前页号 默认为1
	 */
	var pageSize = "${query.pageSize}";
	var isPaginationValue = true;
	var totalSize = 0;
	var currentPageNum = 1;
	$(document).ready(function(){
		//===========注册事件  begin=================================
		//点击新增，弹出模态窗口
		$('#btnAddRecord').click(function(){
			$("#addModal").modal({
				backdrop : "static"
			});
		});

		$("#chkbxIsPagination").change(function(){
			if ($("#chkbxIsPagination").is(":checked")) {//选中  
				isPaginationValue = false;//勾选表示不分页
			} else {
				isPaginationValue = true;
			}
		});
		//注册查询点击事件
		$('#btnSearchFormSubmit').click(function(){
			to_page(1);
		});
		//是否删除，下拉时自动查询
		$('#slctIsDeleted').change(function(){
			to_page(1);
		});

		//===========注册事件  end=================================
		//页面加载完成后获取第一页数据	
		to_page(1);

	});

	/*
		函数名：to_page(pageNum)
		说明：ajax数据列表显示入口，JSON 数据对应后台Query.java 属性
		参数：pageNum：页号
		调用示例：to_page(5)//加载第5页
		其他说明：每次获取页面均会将查询等条件提交到后台
		pageSize：从全局变量获取
		isPaginationValue：全局变量获取
		extend：通过表单转换
	 */
	function to_page(pageNum){
		//加载遮罩====begin=======
		var startTime = new Date();//调用开始时间
		var Dialog2 = CommonUtils.DialogUtil;
		Dialog2.setLoading(1);//1读取，2提交
		Dialog2.setTitle("-");
		Dialog2.show();
		//加载遮罩====begin=======
		var extend = getFormJson("searchForm");
		$.ajax({
			url : "${basePath}/upms/person/list",
			data : {
				"pageNum" : pageNum,
				"pageSize" : pageSize,
				"isPagination" : isPaginationValue,
				"extend" : extend
			},
			type : "POST",
			dataType : "json",
			success : function(result){
				console.log(result);
				$("#tableDataList tbody").empty();//清空数据区
				$("#divPageNavArea").empty();
				//加载列表数据
				loadDataList(result);
				//加载分页信息
				if (totalSize != 0) {
					loadPageInfo(result);
				}
				//加载查询条件
				//loadQueryInfo(result);
				//加载其他信息
				//loadOtherInfo(result);
				Dialog2.hide();//加载完后关闭遮罩
				window.setTimeout(function(){
					//modal-open  去除属性回复滚动条
					$("body").removeClass("modal-open");
				}, 620);
			},
			error : function(){
				alert('调用ajax 失败');
			}
		});
	}

	//加载列表数据
	function loadDataList(result){
		//console.log("hotdog2============="+result);
		totalSize = result.extend.pageInfo.total;//总记录数赋给全局变量
		currentPageNum = result.extend.pageInfo.pageNum;//当前页号给全局变量
		if (totalSize == 0) {
			var nodateTd = $("<td colspan=\"11\"></td>").append("<p class=\"text-danger\">没有显示的数据</p>");
			//载入到tbody中
			$("<tr></tr>").append(nodateTd).appendTo("#tableDataList tbody");
		} else {
			var vo = result.extend.pageInfo.list;
			$.each(vo, function(index , item){
				var checkbox = $("<td><input type=\"checkbox\" name=\"check-list\" /></td>");

				var usercode = $("<td></td>").append(item.usercode);
				var username = $("<td></td>").append(item.username);
				var mobilephone = $("<td></td>").append(item.mobilephone);
				var seqno = $("<td></td>").append(item.seqno);
				//查看按钮
				var readBtn = $("<button></button>").addClass("btn btn-xs btn-primary read_btn").append($("<li></li>").addClass("fa fa-eye")).append(
						"查看").attr("read-id", item.id);
				//修改按鈕
				var editBtn = $("<button></button>").addClass("btn btn-xs btn-primary edit_btn").append(
						$("<li></li>").addClass("fa fa-pencil-square-o")).append("修改").attr("edit-id", item.id);
				//刪除按鈕
				var delBtn = $("<button></button>").addClass("btn btn-xs btn-danger delete_btn").append("删除").attr("delete-id", item.id);
				var btnTd = $("<td></td>").append(readBtn).append(" ").append(editBtn).append(" ").append(delBtn);
				//载入到tbody中
				$("<tr></tr>").append(checkbox).append(usercode).append(username).append(mobilephone).append(seqno).append(btnTd).appendTo(
						"#tableDataList tbody");
			});
		}
	}

	/*
		 函数名：loadPageInfo(result)
	 	说明：加载ajax返回的列表数据
	 	参数：result：ajax返回值
	 	调用示例：
	 */
	function loadPageInfo(result){
		//========构建每页记录数下拉 begin=================
		var size = result.extend.pageInfo.size;//分页插件返回的每页记录数
		var sizeSelect = $("<select></select>");
		var sizeValue = 0;
		for (var i = 0; i < 9; i++) {
			if (i <= 5) {
				sizeValue = sizeValue + 5;//第一个是5
			} else {
				sizeValue = sizeValue + 10;//后面的递增10
			}
			if (sizeValue == size) {
				//数据匹配是为选中
				sizeSelect.append("<option  selected=\"selected\"  value=\""+sizeValue+"\">" + sizeValue + "</option>");
			} else {
				sizeSelect.append("<option   value=\""+sizeValue+"\">" + sizeValue + "</option>");
			}
		}
		sizeSelect.addClass("g-pages");
		sizeSelect.attr("id", "sizeSelect").attr("name", "sizeSelect").attr("onchange", "sizeSelectChange()").attr("size", "1");
		//========构建每页记录数下拉    end=================
		var nav_div = $("<div></div>").addClass("dataTables_info pull-left");
		if (isPaginationValue && totalSize != 0) {
			nav_div.append("当前第" + result.extend.pageInfo.pageNum + "页-共" + result.extend.pageInfo.pages + "页-每页").append(sizeSelect).append(
					"条-总" + totalSize + "条记录");
		} else {
			nav_div.append("当前第1页-共1页").append("-总" + totalSize + "条记录");
		}

		nav_div.attr("aria-live", "polite").attr("role", "status").attr("id", "table_info");
		//构建页码导航
		var nav_ul = $("<ul></ul>").addClass("pagination pull-right");
		//构建：首页li
		var firstPageLi = $("<li></li>").append($("<a></a>").append("首页").attr("href", "#"));
		//构建：上一页li		
		var prePageLi = $("<li></li>").append($("<a></a>").append("上一页").attr("href", "#"));
		if (result.extend.pageInfo.hasPreviousPage == false) {
			//无上一页时，首页和上一页均不能点击
			firstPageLi.addClass("disabled");
			prePageLi.addClass("disabled");
		} else {
			//为元素添加点击翻页的事件
			firstPageLi.click(function(){
				//点击首页
				to_page(1);
			});
			prePageLi.click(function(){
				//点击上一页
				to_page(result.extend.pageInfo.pageNum - 1);
			});
		}
		//构建：下一页li
		var nextPageLi = $("<li></li>").append($("<a></a>").append("下一页").attr("href", "#"));
		//构建：末页li
		var lastPageLi = $("<li></li>").append($("<a></a>").append("末页").attr("href", "#"));
		if (result.extend.pageInfo.hasNextPage == false) {
			nextPageLi.addClass("disabled");
			lastPageLi.addClass("disabled");
		} else {
			nextPageLi.click(function(){
				//点击下一页
				to_page(result.extend.pageInfo.pageNum + 1);
			});
			lastPageLi.click(function(){
				//点击末页
				to_page(result.extend.pageInfo.pages);
			});
		}
		//添加：首页li和前一页li 
		nav_ul.append(firstPageLi).append(prePageLi);
		if (isPaginationValue && totalSize != 0) {
			//分页查询时，遍历添加页码
			$.each(result.extend.pageInfo.navigatepageNums, function(index , item){
				//构建：页码li
				var numLi = $("<li></li>").append($("<a></a>").append(item).attr("href", "#"));
				if (result.extend.pageInfo.pageNum == item) {
					numLi.addClass("active");
				}
				numLi.click(function(){//点击页码
					to_page(item);
				});
				//添加：页码li
				nav_ul.append(numLi);
			});
		}
		//添加：下一页li和末页 li
		nav_ul.append(nextPageLi).append(lastPageLi);
		//载入页码导航区域
		$("#divPageNavArea").append(nav_div).append(nav_ul);
	}

	//改变每页记录条数函数
	function sizeSelectChange(){
		pageSize = $("#sizeSelect").val();//为全局变量赋值
		//改变每页显示记录的值是，重新查询显示第一页
		to_page(1);
	}

	//关闭模态弹窗
	function closeDialog(){
		CommonUtils.DialogUtil.closeFrame();
	}
	/*
	功能:查看按钮点击事件
	说明:点击查看行操作后发起ajax请求，获取数据，将数据初始化模态页面，弹出模态窗口
	 */
	$(document).on("click", ".read_btn", function(){
		var id = $(this).attr("read-id");
		$.ajax({
			url : "${basePath}/upms/person/read/" + id,
			type : "GET",
			success : function(result){
				if (result.code == 111) {
					var vo = result.extend.upmsPerson;
					$("#id_read_static").text(vo.id);
					$("#usercode_read_static").text(vo.usercode);
					$("#username_read_static").text(vo.username);
					$("#realname_read_static").text(vo.realname);
					$("#password_read_static").text(vo.password);
					$("#salt_read_static").text(vo.salt);
					$("#caid_read_static").text(vo.caid);
					$("#phone_read_static").text(vo.phone);
					$("#mobilephone_read_static").text(vo.mobilephone);
					$("#email_read_static").text(vo.email);
					$("#sex_read_static").text(vo.sex);
					$("#avatar_read_static").text(vo.avatar);
					$("#locked_read_static").text(vo.locked);
					$("#createTime_read_static").text(vo.createTime);
					$("#createUsercode_read_static").text(vo.createUsercode);
					$("#createUsername_read_static").text(vo.createUsername);
					$("#pwdtime_read_static").text(vo.pwdtime);
					$("#remarks_read_static").text(vo.remarks);
					$("#isDeleted_read_static").text(vo.isDeleted);
					$("#seqno_read_static").text(vo.seqno);
					$("#reserved1_read_static").text(vo.reserved1);
					$("#reserved2_read_static").text(vo.reserved2);
					$("#reserved3_read_static").text(vo.reserved3);
					$("#reserved4_read_static").text(vo.reserved4);
					$("#reserved5_read_static").text(vo.reserved5);
					$("#reserved6_read_static").text(vo.reserved6);
					$("#readModal").modal({
						backdrop : "static"
					});
				}
			}
		});

	});

	/*
	 功能:删除按钮点击事件
	 说明:
	 1、点击删除行操作后弹窗提示
	 2、确认删除后发起ajax请求
	 3、删除成功或失败均提示
	 4、自动关闭或手动关闭提示信息
	 5、提示关闭后自动刷新页面（重庆获取当前页而不是第一页）
	 */
	$(document).on(
			"click",
			".delete_btn",
			function(){
				var id = $(this).attr("delete-id");
				//var empName = $(this).parents("tr").find("td:eq(2)").text();
				var tips = "确认删除该条记录？";
				CommonUtils.DialogUtil.setTitle("提示");
				CommonUtils.DialogUtil.setMsg(tips);
				CommonUtils.DialogUtil.setAlertClass(4);
				CommonUtils.DialogUtil.setButton('<button class="btn btn-danger" style="margin-right:20px" onclick="deleteAjax(\'' + id
						+ '\')"><i class="fa fa-times"></i>&nbsp;删除</button><button class="btn btn-primary" data-dismiss="modal">放弃删除</button>');
				CommonUtils.DialogUtil.show();

			});

	/*
	 功能:修改按钮点击事件
	 说明:点击修改行操作后发起ajax请求，获取数据，将数据初始化模态页面，弹出模态窗口
	 */
	$(document).on("click", ".edit_btn", function(){
		var id = $(this).attr("edit-id");
		$.ajax({
			url : "${basePath}/upms/person/edit/" + id,
			type : "GET",
			success : function(result){
				if (result.code == 111) {
					var vo = result.extend.upmsPerson;

					$("#id_edit_input").val(vo.id);
					$("#usercode_edit_input").val(vo.usercode);
					$("#username_edit_input").val(vo.username);
					$("#realname_edit_input").val(vo.realname);
					$("#password_edit_input").val(vo.password);
					$("#salt_edit_input").val(vo.salt);
					$("#caid_edit_input").val(vo.caid);
					$("#phone_edit_input").val(vo.phone);
					$("#mobilephone_edit_input").val(vo.mobilephone);
					$("#email_edit_input").val(vo.email);
					$("#sex_edit_input").val(vo.sex);
					$("#avatar_edit_input").val(vo.avatar);
					$("#locked_edit_input").val(vo.locked);
					$("#createTime_edit_input").val(vo.createTime);
					$("#createUsercode_edit_input").val(vo.createUsercode);
					$("#createUsername_edit_input").val(vo.createUsername);
					$("#pwdtime_edit_input").val(vo.pwdtime);
					$("#remarks_edit_input").val(vo.remarks);
					$("#isDeleted_edit_input").val(vo.isDeleted);
					$("#seqno_edit_input").val(vo.seqno);
					$("#reserved1_edit_input").val(vo.reserved1);
					$("#reserved2_edit_input").val(vo.reserved2);
					$("#reserved3_edit_input").val(vo.reserved3);
					$("#reserved4_edit_input").val(vo.reserved4);
					$("#reserved5_edit_input").val(vo.reserved5);
					$("#reserved6_edit_input").val(vo.reserved6);
					$("#editModal").modal({
						backdrop : "static"
					});
				}
			}
		});
	});

	/*
	 功能：新增保存
	 说明：在弹出新增模态窗口中点击保存操作
	 */
	//点击保存，保存员工。
	$("#add_save_btn").click(function(){
		CommonUtils.AjaxUtil.RockAjax("${basePath}/${systemCOde}/person/add", getFormJson("addForm"), {
			submitType : "POST",
			lazyTime : 1000,
			msgTitle : "操作结果",
			msg : "保存成功",
			wrong : "保存失败",
			error : "保存失败",
			successCallback : function(){
				to_page(1);//刷新列表函数
				$("#addModal").modal('hide');//关闭模态窗口

			}

		});
	});
	/*
	 功能：编辑保存
	 说明：在弹出修改模态窗口中点击保存操作
	 */
	$("#edit_save_btn").click(function(){
		CommonUtils.AjaxUtil.RockAjax("${basePath}/upms/person/edit", getFormJson("editForm"), {
			submitType : "POST",
			lazyTime : 1000,
			msgTitle : "操作结果",
			msg : "保存成功",
			wrong : "保存失败",
			error : "保存失败",
			successCallback : function(){
				to_page(1);//刷新列表函数
				$("#editModal").modal('hide');//关闭模态窗口

			}

		});
	});

	//删除ajax调用
	function deleteAjax(id){
		CommonUtils.AjaxUtil.RockAjax("${basePath}/upms/person/delete" + '/' + id, '', {
			submitType : "GET",
			lazyTime : 1000,
			msgTitle : "操作结果",
			msg : "删除成功",
			wrong : "删除失败",
			error : "删除失败",
			successCallback : function(){
				to_page(currentPageNum);//删除后回到当前页
			}
		//completeCallback:function(){alert('完成回调');}
		});
	}

	/*
	 函数名：getFormJson(frm)
	说明：通用函数，用于将表单里的属性序列化为json字符串，key为表单name值
	参数：frm：表单ID
	调用示例：getFormJson("searchForm")//返回查询区的json串
	 */
	function getFormJson(frm){
		var o = {};
		var a = $("#" + frm).serializeArray();
		$.each(a, function(){
			if (o[this.name] !== undefined) {
				if (!o[this.name].push) {
					o[this.name] = [ o[this.name] ];
				}
				o[this.name].push(this.value || '');
			} else {
				o[this.name] = this.value || '';
			}
		});
		return o;
	}
</script>
</head>
<body>
	<!-- 新增模态窗口 begin -->
	<div class="modal fade" id="addModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="myModalLabel">新增员工信息</h4>
				</div>
				<div class="modal-body">
					<form id="addForm" class="form-horizontal">
						<div class="form-group">
							<label class="col-sm-2 control-label">用户号</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_add_input" placeholder="输入用户号">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">用户名称</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_add_input" placeholder="输入用户名称">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">姓名</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_add_input" placeholder="输入姓名">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">密码MD5(密码+盐)</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_add_input" placeholder="输入密码MD5(密码+盐)">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">盐</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_add_input" placeholder="输入盐">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">身份证号</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_add_input" placeholder="输入身份证号">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">电话</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_add_input" placeholder="输入电话">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">手机号</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_add_input" placeholder="输入手机号">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">邮箱</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_add_input" placeholder="输入邮箱">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">性别</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_add_input" placeholder="输入性别">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">头像</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_add_input" placeholder="输入头像">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">状态(0:正常,1:锁定)</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_add_input" placeholder="输入状态(0:正常,1:锁定)">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">创建时间</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_add_input" placeholder="输入创建时间">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">创建人编码</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_add_input" placeholder="输入创建人编码">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">创建人姓名</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_add_input" placeholder="输入创建人姓名">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">密码修改时间</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_add_input" placeholder="输入密码修改时间">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">备注</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_add_input" placeholder="输入备注">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">是否删除0否1是</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_add_input" placeholder="输入是否删除0否1是">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">顺序号</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_add_input" placeholder="输入顺序号">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">预留字段1</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_add_input" placeholder="输入预留字段1">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">预留字段2</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_add_input" placeholder="输入预留字段2">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">预留字段3</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_add_input" placeholder="输入预留字段3">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">预留字段4</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_add_input" placeholder="输入预留字段4">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">预留字段5</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_add_input" placeholder="输入预留字段5">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">预留字段6</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_add_input" placeholder="输入预留字段6">
								<span class="help-block"></span>
							</div>
						</div>
					</form>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-primary" id="add_save_btn">保存</button>
					<button type="button" class="btn btn-default" data-dismiss="modal">返回</button>
				</div>
			</div>
		</div>
	</div>
	<!-- 新增模态窗口 end -->
	<!-- 修改模态窗口 begin -->
	<div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="myModalLabel">修改员工信息</h4>
				</div>
				<div class="modal-body">
					<form id="editForm" class="form-horizontal">
						<div class="form-group">
							<label class="col-sm-2 control-label">用户号</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_edit_input" placeholder="输入用户号">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">用户名称</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_edit_input" placeholder="输入用户名称">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">姓名</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_edit_input" placeholder="输入姓名">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">密码MD5(密码+盐)</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_edit_input" placeholder="输入密码MD5(密码+盐)">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">盐</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_edit_input" placeholder="输入盐">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">身份证号</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_edit_input" placeholder="输入身份证号">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">电话</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_edit_input" placeholder="输入电话">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">手机号</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_edit_input" placeholder="输入手机号">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">邮箱</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_edit_input" placeholder="输入邮箱">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">性别</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_edit_input" placeholder="输入性别">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">头像</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_edit_input" placeholder="输入头像">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">状态(0:正常,1:锁定)</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_edit_input" placeholder="输入状态(0:正常,1:锁定)">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">创建时间</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_edit_input" placeholder="输入创建时间">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">创建人编码</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_edit_input" placeholder="输入创建人编码">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">创建人姓名</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_edit_input" placeholder="输入创建人姓名">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">密码修改时间</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_edit_input" placeholder="输入密码修改时间">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">备注</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_edit_input" placeholder="输入备注">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">是否删除0否1是</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_edit_input" placeholder="输入是否删除0否1是">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">顺序号</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_edit_input" placeholder="输入顺序号">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">预留字段1</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_edit_input" placeholder="输入预留字段1">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">预留字段2</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_edit_input" placeholder="输入预留字段2">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">预留字段3</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_edit_input" placeholder="输入预留字段3">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">预留字段4</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_edit_input" placeholder="输入预留字段4">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">预留字段5</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_edit_input" placeholder="输入预留字段5">
								<span class="help-block"></span>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">预留字段6</label>
							<div class="col-sm-10">
								<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" id="${col.get(" COLUMN_NAME")}_edit_input" placeholder="输入预留字段6">
								<span class="help-block"></span>
							</div>
						</div>
					</form>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-primary" id="edit_save_btn">保存</button>
					<button type="button" class="btn btn-default" data-dismiss="modal">返回</button>
				</div>
			</div>
		</div>
	</div>
	<!-- 修改模态窗口 end -->
	<!-- 查看模态窗口 begin -->
	<div class="modal fade" id="readModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title" id="myModalLabel">查看员工信息</h4>
				</div>
				<div class="modal-body">
					<div class="form-group">
						<label class="col-sm-2 control-label">用户号</label>
						<div class="col-sm-10">
							<p class="form-control-static" id="usercode_read_static"></p>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">用户名称</label>
						<div class="col-sm-10">
							<p class="form-control-static" id="username_read_static"></p>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">姓名</label>
						<div class="col-sm-10">
							<p class="form-control-static" id="realname_read_static"></p>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">密码MD5(密码+盐)</label>
						<div class="col-sm-10">
							<p class="form-control-static" id="password_read_static"></p>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">盐</label>
						<div class="col-sm-10">
							<p class="form-control-static" id="salt_read_static"></p>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">身份证号</label>
						<div class="col-sm-10">
							<p class="form-control-static" id="caid_read_static"></p>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">电话</label>
						<div class="col-sm-10">
							<p class="form-control-static" id="phone_read_static"></p>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">手机号</label>
						<div class="col-sm-10">
							<p class="form-control-static" id="mobilephone_read_static"></p>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">邮箱</label>
						<div class="col-sm-10">
							<p class="form-control-static" id="email_read_static"></p>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">性别</label>
						<div class="col-sm-10">
							<p class="form-control-static" id="sex_read_static"></p>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">头像</label>
						<div class="col-sm-10">
							<p class="form-control-static" id="avatar_read_static"></p>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">状态(0:正常,1:锁定)</label>
						<div class="col-sm-10">
							<p class="form-control-static" id="locked_read_static"></p>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">创建时间</label>
						<div class="col-sm-10">
							<p class="form-control-static" id="createTime_read_static"></p>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">创建人编码</label>
						<div class="col-sm-10">
							<p class="form-control-static" id="createUsercode_read_static"></p>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">创建人姓名</label>
						<div class="col-sm-10">
							<p class="form-control-static" id="createUsername_read_static"></p>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">密码修改时间</label>
						<div class="col-sm-10">
							<p class="form-control-static" id="pwdtime_read_static"></p>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">备注</label>
						<div class="col-sm-10">
							<p class="form-control-static" id="remarks_read_static"></p>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">是否删除0否1是</label>
						<div class="col-sm-10">
							<p class="form-control-static" id="isDeleted_read_static"></p>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">顺序号</label>
						<div class="col-sm-10">
							<p class="form-control-static" id="seqno_read_static"></p>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">预留字段1</label>
						<div class="col-sm-10">
							<p class="form-control-static" id="reserved1_read_static"></p>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">预留字段2</label>
						<div class="col-sm-10">
							<p class="form-control-static" id="reserved2_read_static"></p>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">预留字段3</label>
						<div class="col-sm-10">
							<p class="form-control-static" id="reserved3_read_static"></p>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">预留字段4</label>
						<div class="col-sm-10">
							<p class="form-control-static" id="reserved4_read_static"></p>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">预留字段5</label>
						<div class="col-sm-10">
							<p class="form-control-static" id="reserved5_read_static"></p>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">预留字段6</label>
						<div class="col-sm-10">
							<p class="form-control-static" id="reserved6_read_static"></p>
						</div>
					</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">返回</button>
				</div>
			</div>
		</div>
	</div>
	<!-- 查看模态窗口 end -->
	<!-- 列表主面板 begin -->
	<div class="contentpanel">
		<!-- 查询区 begin -->
		<div class="panel panel-default">
			<div class="panel-heading">
				<div class="panel-btns">
					<a href="#" class="minimize">−</a>
				</div>
				<h4 class="panel-title">查询条件</h4>
			</div>
			<div class="panel-body">
				<form id="searchForm" action="" class="form-horizontal" method="post">
					<div class="row">
						<div class="col-sm-6 col-md-4">
							<div class="form-group m-b-15">
								<label for="input1" class="control-label col-xs-5">用户号：</label>
								<div class="col-xs-7">
									<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" placeholder="输入${col.get(" COLUMN_COMMENT")}" />
								</div>
							</div>
						</div>
						<div class="col-sm-6 col-md-4">
							<div class="form-group m-b-15">
								<label for="input1" class="control-label col-xs-5">用户名称：</label>
								<div class="col-xs-7">
									<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" placeholder="输入${col.get(" COLUMN_COMMENT")}" />
								</div>
							</div>
						</div>
						<div class="col-sm-6 col-md-4">
							<div class="form-group m-b-15">
								<label for="input1" class="control-label col-xs-5">姓名：</label>
								<div class="col-xs-7">
									<input type="text" name="${col.get(" COLUMN_NAME")}" class="form-control" placeholder="输入${col.get(" COLUMN_COMMENT")}" />
								</div>
							</div>
						</div>
						<div class="col-sm-6 col-md-4 pull-right text-right">
							<button id="btnSearchFormSubmit" type="button" class="btn btn-primary">
								<i class="fa fa-search"></i>
								查询
							</button>
						</div>
					</div>
				</form>
			</div>
		</div>
		<!-- 查询区 end -->
		<!-- 列表区begin -->
		<div class="panel panel-default">
			<div class="panel-heading">
				<div class="panel-btns">
					<a id="btnAddRecord" class="btn btn-xs btn-info">
						<i class="fa fa-plus" aria-hidden="true"></i>
						新增
					</a>
				</div>
				<h5 class="panel-title">
					<input id="chkbxIsPagination" name="isPagination" value="false" type="checkbox" />
					查询结果
				</h5>
			</div>
			<div class="panel-body">
				<div class="table-responsive">
					<table id="tableDataList" class="table table-bordered table-striped table-hover table-condensed">
						<thead>
							<tr>
								<th>
									<input type="checkbox" name="check-all" />
								</th>
								<th>用户号</th>
								<th>用户名称</th>
								<th>手机号</th>
								<th>顺序号</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
						</tbody>
					</table>
					<div id="divPageNavArea"></div>
				</div>
			</div>
		</div>
		<!-- 列表区end -->
	</div>
	<!-- 列表主面板 end -->
</body>
</html>